As for Jesus being married, that didn't arise with "The Da Vinci Code". Although this is a major hot topic and a sore subject with most Christians there is really no definitive asnwer (form a historical stand-point) There is little real historical evidence either way, even using the NT as historical evidence.

There is no historical reference to the subject prior to the 2nd century to my knowledge.

Was not actually against the law, just tradition, if he was not married.